home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
ada
/
gnat1792.zip
/
gnat179b
/
t-adainc
/
a-stwico.ads
< prev
next >
Wrap
Text File
|
1994-05-19
|
19KB
|
310 lines
------------------------------------------------------------------------------
-- --
-- GNAT RUNTIME COMPONENTS --
-- --
-- A D A . S T R I N G S . W I D E _ C O N S T A N T S --
-- --
-- S p e c --
-- --
-- $Revision: 1.5 $ --
-- --
-- Copyright (c) 1992,1993,1994 NYU, All Rights Reserved --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. --
-- --
------------------------------------------------------------------------------
with Ada.Strings.Wide_Maps;
with Ada.Characters.Wide_Latin_1; use Ada.Characters.Wide_Latin_1;
package Ada.Strings.Wide_Constants is
Control_Set : constant Wide_Maps.Wide_Character_Set;
Graphic_Set : constant Wide_Maps.Wide_Character_Set;
Letter_Set : constant Wide_Maps.Wide_Character_Set;
Lower_Set : constant Wide_Maps.Wide_Character_Set;
Upper_Set : constant Wide_Maps.Wide_Character_Set;
Basic_Set : constant Wide_Maps.Wide_Character_Set;
Decimal_Digit_Set : constant Wide_Maps.Wide_Character_Set;
Hexadecimal_Digit_Set : constant Wide_Maps.Wide_Character_Set;
Alphanumeric_Set : constant Wide_Maps.Wide_Character_Set;
Special_Graphic_Set : constant Wide_Maps.Wide_Character_Set;
ISO_646_Set : constant Wide_Maps.Wide_Character_Set;
Character_Set : constant Wide_Maps.Wide_Character_Set;
Lower_Case_Map : constant Wide_Maps.Wide_Character_Mapping;
-- Maps to lower case for letters, else identity
private
subtype Cset is Wide_Maps.Wide_Character_Set (
Wide_Character'Val (0) .. Wide_Character'Val (255));
-- Declare constrained subtype so we can use others in aggregates
Control_Set : constant Wide_Maps.Wide_Character_Set := Cset'(
NUL .. US => True,
DEL => True,
Reserved_128 .. APC => True,
others => False);
Graphic_Set : constant Wide_Maps.Wide_Character_Set := Cset'(
NUL .. US => False,
DEL => False,
Reserved_128 .. APC => False,
others => True);
Letter_Set : constant Wide_Maps.Wide_Character_Set := Cset'(
'A' .. 'Z' => True,
'a' .. 'z' => True,
UC_A_Grave .. UC_O_Diaeresis => True,
UC_O_Oblique_Stroke .. LC_O_Diaeresis => True,
LC_O_Oblique_Stroke .. LC_Y_Diaeresis => True,
others => False);
Lower_Set : constant Wide_Maps.Wide_Character_Set := Cset'(
'a' .. 'z' => True,
LC_German_Sharp_S .. LC_O_Diaeresis => True,
LC_O_Oblique_Stroke .. LC_Y_Diaeresis => True,
others => False);
Upper_Set : constant Wide_Maps.Wide_Character_Set := Cset'(
'A' .. 'Z' => True,
UC_A_Grave .. UC_O_Diaeresis => True,
UC_O_Oblique_Stroke .. UC_Icelandic_Thorn => True,
others => False);
Basic_Set : constant Wide_Maps.Wide_Character_Set := Cset'(
'A' .. 'Z' => True,
'a' .. 'z' => True,
UC_AE_Diphthong => True,
LC_AE_Diphthong => True,
LC_German_Sharp_S => True,
UC_Icelandic_Thorn => True,
LC_Icelandic_Thorn => True,
UC_Icelandic_Eth => True,
LC_Icelandic_Eth => True,
others => False);
Decimal_Digit_Set : constant Wide_Maps.Wide_Character_Set := Cset'(
'0' .. '9' => True,
others => False);
Hexadecimal_Digit_Set : constant Wide_Maps.Wide_Character_Set := Cset'(
'0' .. '9' => True,
'A' .. 'F' => True,
'a' .. 'f' => True,
others => False);
Alphanumeric_Set : constant Wide_Maps.Wide_Character_Set := Cset'(
'0' .. '9' => True,
'A' .. 'Z' => True,
'a' .. 'z' => True,
UC_A_Grave .. UC_O_Diaeresis => True,
UC_O_Oblique_Stroke .. LC_O_Diaeresis => True,
LC_O_Oblique_Stroke .. LC_Y_Diaeresis => True,
others => False);
Special_Graphic_Set : constant Wide_Maps.Wide_Character_Set := Cset'(
Space .. Solidus => True,
Colon .. Commercial_At => True,
Left_Square_Bracket .. Grave => True,
Left_Curly_Bracket .. Tilde => True,
No_Break_Space .. Inverted_Question => True,
Multiplication_Sign => True,
Division_Sign => True,
others => False);
ISO_646_Set : constant Wide_Maps.Wide_Character_Set := Cset'(
NUL .. DEL => True,
others => False);
Character_Set : constant Wide_Maps.Wide_Character_Set := Cset'(
others => True);
subtype Lmap_Mapping is Wide_Maps.Wide_Character_Mapping
(Wide_Character range 'A' .. UC_Icelandic_Thorn);
Lower_Case_Map : constant Wide_Maps.Wide_Character_Mapping
:= Lmap_Mapping'(
'A' => 'a', -- 65
'B' => 'b', -- 66
'C' => 'c', -- 67
'D' => 'd', -- 68
'E' => 'e', -- 69
'F' => 'f', -- 70
'G' => 'g', -- 71
'H' => 'h', -- 72
'I' => 'i', -- 73
'J' => 'j', -- 74
'K' => 'k', -- 75
'L' => 'l', -- 76
'M'